package util;

public class StringUtils {
    private StringUtils() {
    }

    public static boolean hasText(String str) {
        if (str == null || str.isEmpty()) {
            return false;
        }

        int length = str.length();
        for (int i = 0; i < length; i++) {
            if (!Character.isWhitespace(str.charAt(i))) {
                return true;
            }
        }

        return false;
    }

    public static boolean hasLength(String str, int expectLength) {
        return str != null && str.length() >= expectLength;
    }

    public static boolean lengthInRange(String str, int lowerBound, int upperBound) {
        return str != null && str.length() >= lowerBound && str.length() <= upperBound;
    }
}
